<template>
  <div class="head">
    <van-search
      v-model="value"
      :placeholder="hotlist[0]+'丨'+hotlist[1]+'丨'+hotlist[2]"
      background="rgb(245,245,245)"
      shape="round"
      @click="goserach"
    >
      <!-- <template #action>
        <div id="zj">
          <van-icon name="clock-o" />
        </div>
      </template> -->
    </van-search>
  </div>
</template>

<script>
export default {
  data() {
    return {
      value: "",
      hotlist:[],
    };
  },
  methods: {
    goserach() {
      this.$router.push({ name: "sousuo" });
    },
  },
  mounted() {
   this.$ajax
      .getkey({
        //获取热门搜索
        installid: "0004ddrL",
        appid: "0",
        operator: "2",
        version: "5.3.4",
        udid: "1dd9a71d07d7445b22a52fc5e3191fd1",
        sign: "1b881e03776150f8f1d54e594cc8f6a0",
        suppermode: "0",
        devicetype: "1",
        usertype: "0",
        mac: "020000000000",
        timestamp: "1609900766",
        sessionid: "391E433215AE420088931499ACA95134",
        idfv: "416DBEDF-8F90-44A8-BC8B-586F2F9036CD",
        producer: "apple",
        idfa: "0E03CA4F-EC5F-4E29-9DAC-26D332D07B91",
        screensize: "375*812",
        likeCountDependOnServer: "1",
        pageid: "109",
        page: "200014",
        lat: "30.460388",
        osversion: "14.0.1",
      })
      .then((res) => {
       this.hotlist=res.result.dataList.slice(0,3)
        console.log(this.hotlist)
      });
  },
};
</script>

<style scoped>
.van-search__content {
  background-color: rgb(235, 235, 235);
}

#zj {
  font-size: 20px;
}
</style>